package br.ita.comp.ces22.quiz.core;

import java.io.File;
import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

public class LogManager {
	public static Logger logger = null;

	static {
	    try {
	      boolean append = true;
	      String logFilename = "c:" + File.separator + "ces22" + File.separator + "quiz.log";
	      FileHandler fileHandler = new FileHandler(logFilename, append);
	      fileHandler.setFormatter(new SimpleFormatter());
	      logger = Logger.getLogger("LogManager");
	      logger.addHandler(fileHandler);
	    }
	    catch (IOException e) {
	      e.printStackTrace();
	    }
	}
}